package com.gdk.ksoft.assembly.widget;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.gdk.ksoft.R;
import com.gdk.ksoft.data.entry.TitleListItem;

/**
 * Created by Mrper on 2014/11/21.
 * 标题列表项视图
 */
public class TitleListItemView extends BaseListItemView {

    private TitleListItem item;

    public TitleListItemView(TitleListItem item){
        this.item = item;
    }

    @Override
    public Object getItem() {
        return this.item;
    }

    @Override
    public boolean isClickable() {
        return false;
    }

    @Override
    public View getView(Context context, View convertView, int position) {
        convertView = View.inflate(context, R.layout.item_fwork_title,null);
        ImageView imgIcon = (ImageView)convertView.findViewById(R.id.item_fwork_title_imgIcon);
        TextView txtTitle = (TextView)convertView.findViewById(R.id.item_fwork_title_txtTitle);
        txtTitle.setText(this.item.titleName);
        return convertView;
    }
}
